package thread;

class SingletonLazy {
    public volatile SingletonLazy instance = null;
    Object locker = new Object();
    public SingletonLazy getInstance() {
        if(instance == null) {
            synchronized (locker) {
                if(instance == null) {
                    instance = new SingletonLazy();
                }
            }
        }
        return instance;
    }

    private SingletonLazy(){}
}

public class ThreadDemo27 {
}
